#include "player.h"

Player::Player(QObject *parent) : QObject(parent)
{
    this->m_score=0;
    this->m_iswin=false;
}

Player::Player(QString name, QObject *parent):Player (parent)
{
    this->m_name=name;
}

QString Player::name() const
{
    return m_name;
}

void Player::setName(const QString &name)
{
    m_name = name;
}

 Player::Role Player::role() const
{
    return m_role;
}

void Player::setRole(const Role &role)
{
    m_role = role;
}

 Player::Sex Player::sex() const
{
    return m_sex;
}

void Player::setSex(const Sex &sex)
{
    m_sex = sex;
}

 Player::Direction Player::direction() const
{
    return m_direction;
}

void Player::setDirection(const Direction &direction)
{
    m_direction = direction;
}

 Player::Type Player::type() const
{
    return m_type;
}

void Player::setType(const Type &type)
{
    m_type = type;
}

int Player::score() const
{
    return m_score;
}

void Player::setScore(int score)
{
    m_score = score;
}

bool Player::iswin() const
{
    return m_iswin;
}

void Player::setIswin(bool iswin)
{
    m_iswin = iswin;
}

Player *Player::prev() const
{
    return m_prev;
}

void Player::setPrev(Player *prev)
{
    m_prev = prev;
}

Player *Player::next() const
{
    return m_next;
}

void Player::setNext(Player *next)
{
    m_next = next;
}

void Player::grabLordBt(int point)
{
    emit notifyGrabLordBet(this,point);
}

void Player::storeDispatchCard(Card &card)
{
    m_cards.add(card);
}

void Player::storeDispatchCard(Cards &cards)
{
    m_cards.add(cards);
}

Cards Player::getCards()
{
    return m_cards;
}

void Player::clearCards()
{
    m_cards.clear();
}

void Player::playHand(Cards &cards)
{
    m_cards.remove(cards);
}

void Player::setPendingInfo(Player *player, Cards &cards)
{
    m_pendPlayer=player;
    m_pendCards=cards;
}

Player *Player::getPendPlayer()
{
    return m_pendPlayer;
}

Cards Player::getPendCards()
{
    return m_cards;
}

void Player::prepareCallLord()
{

}

void Player::preparePlayHand()
{

}

